package com.etc.util;

import java.util.ArrayList;
import java.util.List;

/**
 * 在servlet响应的数据格式应该是如下类
 * @author Administrator
 *
 * @param <T>
 */
public class ResponseData<T> {

	private int code = 0;
	private String msg = "success";
	
	private int count = 0;
	

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	private List<T> data = new ArrayList();

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public List<T> getData() {
		return data;
	}

	public void setData(List<T> data) {
		this.data = data;
	}

	public ResponseData(int code, String msg, List<T> data) {
		super();
		this.code = code;
		this.msg = msg;
		this.data = data;
	}

	
	public ResponseData(int code, String msg, int count, List<T> data) {
		super();
		this.code = code;
		this.msg = msg;
		this.count = count;
		this.data = data;
	}
	
	public ResponseData( int count, List<T> data) {
		this.count = count;
		this.data = data;
	}

	public ResponseData() {
		// TODO Auto-generated constructor stub
	}
}
